/* AI功能中心样式 */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 统一头部样式 */
#Header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#Header h1 {
    color: white;
    font-weight: 600;
}

#Header .nav-btn {
    color: white;
}

#Header .nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* Tab 导航样式 */
.ai-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tab-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.tab-nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.tab-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

.tab-nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.tab-nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* Tab 内容样式 */
.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* AI聊天容器 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 10px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* AI助手头像区域 */
.ai-assistant-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.ai-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.ai-avatar-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: rotate 8s linear infinite;
    top: -5px;
    left: -5px;
}

.ai-avatar {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    animation: bounce 2s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.ai-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

/* 快捷问题 */
.quick-questions {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.quick-question {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.quick-question:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    padding: 20px 20px 100px;
    overflow-y: auto;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

/* 消息气泡样式 */
.message {
    max-width: 80%;
    word-wrap: break-word;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    align-self: flex-end;
}

.message.ai {
    align-self: flex-start;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    margin-bottom: 5px;
    white-space: pre-wrap;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: 40px;
}

.message.ai .message-bubble {
    background: #f1f3f4;
    color: #333;
    margin-right: 40px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.message.ai .message-time {
    text-align: left;
}

/* 输入区域 */
.chat-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #eee;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
    transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 14px;
    outline: none;
    color: #333;
}

.chat-input::placeholder {
    color: #999;
}

.send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

/* 打字指示器 */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: #666;
    font-size: 13px;
}

.typing-indicator.show {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* 科技新闻样式 */
.news-container {
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    margin: 10px;
    border-radius: 20px;
    height: calc(100% - 20px);
    overflow-y: auto;
}

.news-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.news-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.news-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    display: flex;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 15px;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
}

.news-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.3;
}

.news-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.news-time {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

/* 滚动条美化 */
.chat-messages::-webkit-scrollbar,
.news-container::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.news-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb,
.news-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.news-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .chat-container,
    .news-container {
        margin: 5px;
        border-radius: 15px;
    }
    
    .quick-questions {
        padding: 15px;
    }
    
    .quick-question {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .message {
        max-width: 85%;
    }
    
    .ai-title {
        font-size: 20px;
    }
    
    .ai-avatar {
        width: 60px;
        height: 60px;
        font-size: 25px;
    }
    
    .ai-avatar-ring {
        width: 70px;
        height: 70px;
    }
} 